<?php
class Zendvn_Validate_ConfirmPassword extends Zend_Validate_Abstract{
	
	const NOT_EQUAL   = 'notEqual';
	
	protected $password;
	/**
     * @var array
     */
    protected $_messageTemplates = array(
        self::NOT_EQUAL   => "password is not equal confirm password",
    );
	
	public function __construct($password) {
		$this->password = $password;
	}

	public function isValid($value) {
		if(strcmp($value, $this->password) != 0){
			$this->_error('notEqual', $value);
			return FALSE;
		}
		return TRUE;
	}
}